package com.by.mapper;

import com.by.bean.Goods;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface GoodsMapper {
    List<Goods> querySecKillGoods();

    Goods get(int id);//根据id查询商品

    /**
     * 扣减库存
     * @param id 商品id
     * @param num 扣减数量
     * @return
     */
    int updateStock(@Param("id") int id,@Param("num") int num);
}
